import React from "react"
import { Link } from "react-router-dom"

import courses from "./feCourse"

const CourseList: React.FC = () => {
  return (
    <ul>
      {courses.map(course => {
        return <li key={course.id}>
          <Link to={`/courses/${course.id}`}>{course.name}</Link>
        </li>
      })}
    </ul>
  )

}

export default CourseList
